package lobby.exchangeddata
{
	import flash.events.EventDispatcher;
	import lobby.events.LobbyEvent;
	
	/**
	 * ...
	 * @author Bamboo
	 */
	public class HistoryInfoBase extends EventDispatcher
	{
		private var tableName:String = "";
		private var tableId:String = "";
		private var casinoName:String = "";
		private var casinoId:String = "";
		private var gameType:String = "";
		protected var gameTypeIndex:Number;
		private var tableClose:Boolean;
		public var history:Array;
		public var odlResult:String; // check call showresult that is loops 		
		
		public function init(casinoid:String, casinoName:String, gameType:String, tableId:String, tableName:String, tableClose:Boolean):void
		{
			this.casinoId = casinoid;
			this.casinoName = casinoName;
			this.gameType = gameType;
			this.tableId = tableId;
			this.tableName = tableName;
			this.tableClose = tableClose;
			history = new Array();
		}
		
		public function get getTableName():String
		{
			return this.tableName;
		}
		
		public function get getTableId():String
		{
			return this.tableId;
		}
		
		public function get getCasinoName():String
		{
			return this.casinoName;
		}
		
		public function get getCasinoId():String
		{
			return this.casinoId;
		}
		
		public function set setCasinoId(value:Array):void
		{
			this.history = value;
		}
		
		public function get getTableClose():Boolean
		{
			return this.tableClose;
		}
		
		/**
		 * @usage Send to Lobby data with info has update data for history at tableId
		 * @author Bamboo
		 * @param	result: is array history
		 */
		public function setHistory(result:Array):void
		{
			this.history = result;
			var evt:LobbyEvent = new LobbyEvent(LobbyEvent.UPDATE_HISTORY_ROUTE, true);
			evt.tableId = this.getTableId;
			dispatchEvent(evt);
		}
		
		public function get getHistory():Array
		{
			return this.history;
		}
		
		public function get getGameType():String
		{
			return this.gameType;
		}
		
		/**
		 * Bussiness data that response by FMS
		 */
		public function returnSetHistory(result:String):Array
		{
			var resultArr:Array = new Array();
			return resultArr;
		}
		
		public function set setOdlResult(value:String):void
		{
			this.odlResult = value;
		}
		
		public function get getOdlResult():String
		{
			return this.odlResult;
		}
	
		public function get getGameTypeIndex():Number
		{
			return this.gameTypeIndex;
		}
	}

}